'''
Description: SQL引擎管理模块
Author: HowsenFisher
Date: 2021-04-07 08:24:27
LastEditTime: 2021-04-11 09:22:32
LastEditors: liutq
Reference: 
'''
from sqlalchemy import *
from Config import conf

'''
@description: 获取本地数据库引擎
@param  {*}
@return {*}
'''
def getWordDB():
    # sqlite
    engine = create_engine("sqlite:///sql/word.db?check_same_thread=False")
    return engine

'''
@description: 获取管理员数据库引擎
@param  {*}
@return {*}
'''
def getFileDB():
    # mysql
    engine = create_engine("mysql+pymysql://%s:%s@%s:3306/file"%(conf.admin_sql_username,conf.admin_sql_password,conf.admin_ip))
    return engine